<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-us" xml:lang="en-us">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="Backup">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="en-us_topic_0000001826879840.html">
  <meta name="DC.Relation" scheme="URI" content="postgresql-0009_a1.html">
  <meta name="DC.Relation" scheme="URI" content="postgresql-0010-2.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect Appliance 1.5.0-1.6.0 Help Center">
  <meta name="DC.Publisher" content="20241029">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="postgresql-0006_a1">
  <meta name="DC.Language" content="en-us">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>Backup</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="postgresql-0006_a1"></a><a name="postgresql-0006_a1"></a>
  <h1 class="topictitle1">Backup</h1>
  <div>
   <div class="section">
    <h4 class="sectiontitle">Prerequisites</h4>
    <ul>
     <li>The archive mode must be enabled before database backup.<p>Modify the <strong>wal_level</strong>, <strong>archive_mode</strong>, and <strong>archive_command</strong> parameters in the <strong>postgresql.conf</strong> file.</p>
      <ul>
       <li>Set <strong>wal_level</strong> to <strong>archive</strong> or higher (or <strong>replica</strong> or higher for PostgreSQL 9.6 or later).</li>
       <li>Set <strong>archive_mode</strong> to <strong>on</strong>.</li>
       <li>Set <strong>archive_command</strong> to <strong>'cp %p /home/postgres/archivedir/%f'</strong> and ensure that the archive log path is a single path.</li>
      </ul> <p>For example:</p> <p>wal_level = replica</p> <p>archive_mode = on</p> <p>archive_command = 'cp %p /home/postgres/archivedir/%f'</p></li>
    </ul>
   </div>
  </div>
  <div>
   <ul class="ullinks">
    <li class="ulchildlink"><strong><a href="postgresql-0009_a1.html">Preparations for Backup</a></strong><br></li>
    <li class="ulchildlink"><strong><a href="postgresql-0010-2.html">Backing Up PostgreSQL</a></strong><br></li>
   </ul>
   <div class="familylinks">
    <div class="parentlink">
     <strong>Parent topic:</strong> <a href="en-us_topic_0000001826879840.html">PostgreSQL Data Protection</a>
    </div>
   </div>
  </div>
 </body>
</html>